<?php
/**
 * Created by PhpStorm.
 * User: nightelf
 * Date: 2020/6/11
 * Time: 16:01
 */

namespace App\Http\Model;


use Illuminate\Support\Facades\DB;

class MaterialCategoryModel
{
    const TABLE = 'material_category';

    public function lists()
    {
        return DB::table(self::TABLE)->get()->toArray();
    }

    public function info(array $array)
    {
        $result = DB::table(self::TABLE)->where($array)->first();
        return empty($result)?[]:get_object_vars($result);
    }

}